<T:ViewBase x:Class="WPFExcelReport.TQPPLAN"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                    xmlns:QS="clr-namespace:WPFExcelReport;assembly=TQPSTEP" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    Name="TV"
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </T:ViewBase.Resources>
    <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" >
                <WrapPanel  >
                    <Grid Margin="10,0,0,0" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=新计划}}"></TextBlock>
                    <Button Grid.Column="1"  Click="NewCommand" Height="20" Margin="5,0,0,0" Width="20" >
                            <Button.Background>
                                <ImageBrush  ImageSource="/ImagePackage;component/Images/Add.png" />
                            </Button.Background>
                        </Button>
                    </Grid>
                    <Grid Margin="10,0,0,0" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Button  Click="EditCommand" Width="16" Height="16">
                            <Button.Background>
                                <ImageBrush  ImageSource="/ImagePackage;component/Images/Edit.png" />
                            </Button.Background>
                        </Button>
                    </Grid> 
                    <Grid Margin="10,0,0,0" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Button    Click="CopyCommand" Height="20" Margin="5,0,0,0" Width="20" >
                            <Button.Background>
                                <ImageBrush  ImageSource="/ImagePackage;component/Images/copy.png" />
                            </Button.Background>
                        </Button>
                    </Grid>
                    <Grid Margin="10,0,0,0" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Button   Click="SaveCommand" Height="20" Margin="5,0,0,0" Width="20" >
                            <Button.Background>
                                <ImageBrush  ImageSource="/ImagePackage;component/Images/Save.png" />
                            </Button.Background>
                        </Button>
                    </Grid>
                    <Grid Margin="10,0,0,0"  >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>

                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"  Text="{Binding Source={Localization:Translate Word=类型:}}" ></TextBlock>
                        <ex:TXT72 MaxLength="1" PRE=" " Grid.Column="1"  FontSize="18" Foreground="Red"   Text="{Binding ARTST}" Width="30"/>
                    </Grid>
                    <Grid Margin="10,0,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=分类:}}"></TextBlock>
                        <ex:TXT72 MaxLength="2" Grid.Column="1" CharacterCasing="Upper" Text="{Binding KRS}" Width="40" />
                    </Grid>
                </WrapPanel>
                <WrapPanel>
                    <Grid Margin="10,0,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=类型:}}"></TextBlock>
                        <TextBlock  Grid.Column="1"  Text="{Binding QPPARTST, Source={StaticResource vwMaster}}" Width="30" />
                    </Grid>
                    <Grid Margin="10,0,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=质检计划:}}"></TextBlock>
                        <TextBlock   Grid.Column="1"  Text="{Binding QPPPNRKRS, Source={StaticResource vwMaster}, Converter={StaticResource gb2312}}" Width="40" />
                        <TextBlock   Grid.Column="2"   Text="{Binding QPPPLFDNR, Source={StaticResource vwMaster}, Converter={StaticResource gb2312}}" Width="60" />
                    </Grid>
                    <Grid Margin="10,0,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=说明:}}"></TextBlock>
                        <ex:TXT72   Grid.Column="1"  MaxLength="50" Text="{Binding QPPSPEZIF, Source={StaticResource vwMaster}, Converter={StaticResource gb2312}}" 
                                IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                                Width="200" />
                    </Grid>
                </WrapPanel>
            </StackPanel>
            <QS:TQPSTEP  Grid.Row="1"
                         Name="cQP04"
                 QPLAN="{Binding QPKEY,ElementName=TV}" 
                FTAUTOQC="{Binding FTAUTOQC,ElementName=TV}" 
                IsEdit="{Binding IsEdit,ElementName=TV}"
                />
        </Grid> 
    
</T:ViewBase>
